<?php
		
//reserve notes - only applies if we are editing a reserve (item instance linked to a course instance)
$id = 
	$this->editReserve
	? $this->reserve->getReserveID()
	: $this->item->getItemID();
$type = $this->editReserve ? 'reserve': 'item';

//fetch notes
$notes = noteManager::fetchNotesForObj($type, $id, true);

//only allow adding notes to reserves (not items) unless edited by staff
$include_addnote_button = Account_Rd::atLeastStaff() || $this->editReserve;
?>
<script language="JavaScript1.2" src="public/javascript/basicAJAX.js"></script>
<script language="JavaScript1.2" src="public/javascript/notes_ajax.js"></script>

<div class="headingCell1">NOTES</div>
<div style="padding:8px 8px 12px 8px;">
	<?php $this->getDisplayer()->displayNotesBlockAJAX($notes, $type, $id, $include_addnote_button); ?>
</div>